<form id="gedit-collocation-detail">
<input type="hidden" name="info_goods_id" value="<{$info_goods_id}>" />
<div class="division">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th><{t}>搭配组名称：<{/t}></th>
    <td><input type="text" name="name" value="如：耳机、电池、领带等，也可不填" /></td>
  </tr>
  </table>
</div>
<div class="division">  
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th><{t}>选择搭配商品：<{/t}></th>
    <td><{input name="type" type="radio" separator=" " value="goods" options=$aOptions }></td>
  </tr>
</table>
</div>

<div class="table-action">
	<{button label="下一步" onclick="addCollocationRow()"}>
</div>

</form>

<script>
window.addEvent('domready',function(){
	var el_input = $E('#gedit-collocation-detail input[name=name]');
	var input_txt = el_input.get('value');
	el_input.addEvents({
		'focus':function(e){
			e.stop();
			this.set('value','');
		},
		'blur':function(e){
			e.stop();
			/*this.set('value',input_txt);*/
		}
	});
});
function addCollocationRow(){
  var el=new Element('div').inject('goods-collocation');
  W.page('index.php?ctl=plugins/ctl_collocate_goods&act=doCollocation',{update:el,method:'post',data:$('gedit-collocation-detail')});
  goodsEditor.dialog.close();
}
</script>